package com.example.mybatis.pojo;

import java.io.Serializable;
import java.util.List;

public class Draft implements Serializable {
    private static final long serialVersionUID = -4852658907724408209L;

    private String id;
    private String deptId;
    private String name;
    private String remark;

    /**
     * User表中有一个dept_id字段，要在User类中定义一个dept属性，
     * 用于维护dept和user之间的一对一关系
     */
    private Dept dept;

    //使用一个List<Pdept>集合属性表示父级部门中的子部门
    private List<Pdept> pdepts;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public List<Pdept> getPdepts() {
        return pdepts;
    }

    public void setPdepts(List<Pdept> pdepts) {
        this.pdepts = pdepts;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", deptId='" + deptId + '\'' +
                ", name='" + name + '\'' +
                ", remark='" + remark + '\'' +
                ", dept=" + dept +
                ", pdepts=" + pdepts +
                '}';
    }
}